import ajax from './ajax'

// 请求首页文章列表
export const reqHomeArtical = (articleObj, pageSize, page) => {
  return ajax({
    method: 'GET',
    url: '/api/articles',
    params: {
      ...articleObj,
      limit: pageSize,
      offset: (page - 1) * pageSize
    }
  })
}

// 请求tag列表
export const reqHomeTags = () => {
  return ajax({
    url: '/api/tags',
    method: 'get',
  })
}